Skip to content

chore(api): move @opentelemetry/sdk-trace-base to the 2.x line - #3677

Open
teeohhem wants to merge 1 commit into
mainfrom
claude/api-sdk-trace-base-2
Open

teeohhem wants to merge 1 commit into
mainfrom
claude/api-sdk-trace-base-2

Conversation

@teeohhem

Copy link
Copy Markdown
Contributor

Summary

Move the @opentelemetry/sdk-trace-base dev dependency in packages/api from ^1.30.1 to ^2.8.0.

  • The api's other OpenTelemetry packages (@opentelemetry/core, @opentelemetry/resources) are already on 2.x, and the tree already resolves sdk-trace-base 2.12.0. The new range reuses that copy.
  • The 1.x range pulled in a second copy of core, resources, sdk-trace-base and semantic-conventions. Removing it also removes @opentelemetry/core 1.30.1, which is flagged by GHSA-8988-4f7v-96qf (fixed in 2.8.0).
  • Its only user is src/utils/__tests__/aiTelemetry.test.ts, which already passes span processors through the constructor, the API 2.x requires. No code changes needed.

How to test locally or on Vercel

  1. yarn install
  2. cd packages/api && npx tsc --noEmit: passes.
  3. npx jest src/utils/__tests__/aiTelemetry.test.ts: 6 tests pass.

Dev dependency only, so no changeset.

🤖 Generated with Claude Code

The api's other OpenTelemetry packages (@opentelemetry/core, resources) are
already on 2.x, and the tree already resolves sdk-trace-base 2.12.0. The 1.x
dev dependency pulled in a second copy of core, resources, sdk-trace-base and
semantic-conventions. The only user is the AI telemetry test, which already
uses the constructor API that 2.x requires.
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hyperdx-oss Ready Ready Preview Nov 16, 2026 3:48pm UTC
hyperdx-storybook Ready Ready Preview Nov 16, 2026 3:48pm UTC

Request Review

@teeohhem
teeohhem requested a review from a team as a code owner November 16, 2026 15:45
@changeset-bot

changeset-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c8ea89d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added the review/tier-2 Low risk — AI review + quick human skim label Nov 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔵 Tier 2 — Low Risk

Small, isolated change with no API route or data model modifications.

Why this tier:

  • Standard feature/fix — introduces new logic or modifies core functionality

Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns.
SLA: Resolve within 4 business hours.

Stats
  • Production files changed: 1
  • Production lines changed: 2
  • Branch: claude/api-sdk-trace-base-2
  • Author: teeohhem

To override this classification, remove the review/tier-2 label and apply a different review/tier-* label. Manual overrides are preserved on subsequent pushes.

@github-actions

Copy link
Copy Markdown
Contributor

PR Review

✅ No issues found.

@github-actions

Copy link
Copy Markdown
Contributor

Duplicate code analysis

No new duplicate code introduced by this PR.


jscpd compared this branch against origin/main
across app, api and common-utils. Only new clones are listed; the codebase
currently holds 108 in total (1.18%).
Run yarn dupes locally to reproduce, or yarn dupes:all for the full picture.

@github-actions

Copy link
Copy Markdown
Contributor

Deep Review

✅ No critical issues found.

This is a dev-only dependency bump: @opentelemetry/sdk-trace-base in packages/api moves from ^1.30.1 to ^2.8.0, and yarn.lock drops the now-unused 1.30.1 copies of sdk-trace-base, @opentelemetry/core, @opentelemetry/resources, and @opentelemetry/semantic-conventions. The reviewers confirmed the change is safe:

  • The sole consumer, packages/api/src/utils/__tests__/aiTelemetry.test.ts, already uses the OpenTelemetry 2.x constructor API (new BasicTracerProvider({ spanProcessors: [...] }) at lines 78 and 194) with no addSpanProcessor call, so declaring ^2.8.0 matches the API the test actually exercises rather than introducing a mismatch.
  • The ^2.8.0 range aliases the already-resolved 2.12.0 entry, whose peer requirement @opentelemetry/api >=1.3.0 <1.10.0 is satisfied by the api package's ~1.9.1.
  • The test asserts on literal gen_ai.* span attribute keys and getFinishedSpans() shape, neither of which depends on the removed semantic-conventions@1.28.0.
  • The missing changeset is correct per the repo's documented policy, which exempts test/internal-tooling-only changes; the changeset-bot notice is informational, not a merge gate.

No P0/P1, P2, or P3 findings surfaced after re-grading.


Reviewers (3): correctness, project-standards, previous-comments.

@github-actions

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ All tests passed • 466 passed • 1 skipped • 1035s

Status Count
✅ Passed 466
❌ Failed 0
⚠️ Flaky 2
⏭️ Skipped 1

Tests ran across 4 shards in parallel.

View full report →

This branch was successfully deployed

2 active deployments
Preview – hyperdx-oss — c8ea89d0 Deployed Nov 16, 2026 by vercel[bot]
Preview – hyperdx-storybook — c8ea89d0 Deployed Nov 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge review/tier-2 Low risk — AI review + quick human skim

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant